package com.foreknow.service;

import com.foreknow.dao.AdminDao;
import com.foreknow.dao.impl.AdminDaoImpl;
import com.foreknow.model.Admin;

public class AdminService {

    private AdminDao adminDao;

    public void setAdminDao(AdminDao adminDao) {
        this.adminDao = adminDao;
    }

    public void save(Admin admin){
        adminDao.add(admin);
    }

    public static void main(String[] args) {
        AdminService service = new AdminService();
        service.setAdminDao(new AdminDaoImpl());
        service.save(new Admin());
    }

}